<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../css/new.css">
    <style type="text/css">
      .p-btn{;text-align: center;background:#275EB1;color: #fff;
      font-size: 18px;line-height: 40px;height: 40px;margin:20px 0;border-radius: 5px;}
    </style>
	</head>
	<body>
		<div class="mui-content" id="page">
			<div class="mui-row">
				<img class="p-posa p-mh p-mw" src="../img/user_center.png">
				<div class="p-posa p-mw user-h">
					<div class="user-yb p-yuanjiao">
						<img class="p-mw p-yuanjiao" src="../img/h.png">
					</div>
					<span>{{user.compellation}}</span>
					<font>{{user.phone}}</font>
				</div>
				<!-- end user-h -->
				<div class="mui-row p-posa user-a">
					<div class="mui-col-sm-12 mui-col-xs-12">
						<div class="mui-table-view-cell">
							<a class="mui-navigate-right" @click="toSetting">
								个人档案    
							</a>
							<!--
							<a class="mui-navigate-right" @click="toEdu">
								我的课程    
							</a>
							<a class="mui-navigate-right" @click="toSetting">
								个人信息    
							</a> -->
              <div class="p-btn" @click="logout">退出登录</div>
						</div>
            
						<div class="p-posa user-a-a"></div>
						<div class="p-posa user-a-b"></div>
					</div>
				</div>
				<!-- end user-a -->
				<div class="p-posa p-mw user-b">Copyright © 2018-2020 中广核新能源</div>
			</div>
		</div>
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="../../../js/vue.js"></script>
		<script src="../js/mkeyplus.base.js?1"></script>
		<script src="js/api.js"></script>
		<script>
			var htapi = new HTGlobal();
			mui.init();
			mui.plusReady(function(){
				
			})
			var page = new Vue({
				el:"#page",
				data:{
					user:{
						compellation:''
					}
				},
				created(){
					this.pload()
				},
				methods:{
					toEdu(){
						// mui.openWindow({
						// 	url:'../edu/index.html',
						// 	id:'../edu/index.html'
						// });
            mui.openWindow({
              url: '../course/myCourse.html',
              id: '../course/myCourse.html',
              extras: {},
              waiting: {
                autoShow: false
              }
            })
					},
					toSetting(){
						mui.openWindow({
						  url: './personal_data.html',
						  id: 'formal_personal_data.html'
						})
					},
					pload(){
						var _user = localStorage.getItem('outUser');
						if(_user){
							this.user = JSON.parse(_user)
						}
					},
					logout(){
						htapi.outsidersLogout()
					}
				}
			});
					var first = null;
					mui.plusReady(function () {
						var new_back = mui.back;
						mui.back = function() {
							//首次按键，提示‘再按一次退出应用’
							if(!first) {
								first = new Date().getTime();
								mui.toast('再按一次退出应用');
								setTimeout(function() {
									first = null;
								}, 800);
							} else {
								if(new Date().getTime() - first < 1000) {
									plus.runtime.quit();
								}
							}
						}
					})
					
					
		window.addEventListener('refresh', function(e){//执行刷新
		    location.reload();
		});
		</script>
	</body>
</html>
